import {createRouter, createWebHistory} from "vue-router";
import {App} from "vue";
import routes from "./routes.ts";
import guard from "@/router/guard.ts";

const router = createRouter({
    //不使用哈希，使用普通地址栏
    history: createWebHistory(),
    routes
})

export function runRouter(app: App) {
    guard(router);
    app.use(router);
}

export default router;